package com.chenbei.erp.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chenbei.common.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;

@EqualsAndHashCode(callSuper = true)
@Schema(description = "采购订单详情")
@Data
@TableName("erp_purchase_order_detail")
public class PurchaseOrderDetail extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "采购订单ID")
    @TableField("order_id")
    private Long orderId;

    @Schema(description = "产品ID")
    @TableField("product_id")
    private Long productId;

    @Schema(description = "产品名称")
    @TableField("product_name")
    private String productName;

    @Schema(description = "产品单位")
    @TableField("product_unit")
    private String productUnit;

    @Schema(description = "采购单价(默认产品成本价格)")
    private BigDecimal price;

    @Schema(description = "税率")
    private BigDecimal taxRate;

    @Schema(description = "采购总数量")
    private Integer count;

    @Schema(description = "备注")
    private String remark;
}
